Integrand size = 26, antiderivative size = 422 \[ \int f^{a+b x+c x^2} \cos ^3\left (d+e x+f x^2\right ) \, dx=\frac {3 e^{-i d-\frac {(e+i b \log (f))^2}{4 i f-4 c \log (f)}} f^a \sqrt {\pi } \text {erf}\left (\frac {i e-b \log (f)+2 x (i f-c \log (f))}{2 \sqrt {i f-c \log (f)}}\right )}{16 \sqrt {i f-c \log (f)}}+\frac {e^{-3 i d-\frac {(3 e+i b \log (f))^2}{4 (3 i f-c \log (f))}} f^a \sqrt {\pi } \text {erf}\left (\frac {3 i e-b \log (f)+2 x (3 i f-c \log (f))}{2 \sqrt {3 i f-c \log (f)}}\right )}{16 \sqrt {3 i f-c \log (f)}}+\frac {3 e^{i d+\frac {(e-i b \log (f))^2}{4 i f+4 c \log (f)}} f^a \sqrt {\pi } \text {erfi}\left (\frac {i e+b \log (f)+2 x (i f+c \log (f))}{2 \sqrt {i f+c \log (f)}}\right )}{16 \sqrt {i f+c \log (f)}}+\frac {e^{3 i d-\frac {(3 i e+b \log (f))^2}{4 (3 i f+c \log (f))}} f^a \sqrt {\pi } \text {erfi}\left (\frac {3 i e+b \log (f)+2 x (3 i f+c \log (f))}{2 \sqrt {3 i f+c \log (f)}}\right )}{16 \sqrt {3 i f+c \log (f)}} \]
3/16*exp(-I*d-(e+I*b*ln(f))^2/(4*I*f-4*c*ln(f)))*f^a*erf(1/2*(I*e-b*ln(f)+ 2*x*(I*f-c*ln(f)))/(I*f-c*ln(f))^(1/2))*Pi^(1/2)/(I*f-c*ln(f))^(1/2)+1/16* exp(-3*I*d-1/4*(3*e+I*b*ln(f))^2/(3*I*f-c*ln(f)))*f^a*erf(1/2*(3*I*e-b*ln( f)+2*x*(3*I*f-c*ln(f)))/(3*I*f-c*ln(f))^(1/2))*Pi^(1/2)/(3*I*f-c*ln(f))^(1 /2)+3/16*exp(I*d+(e-I*b*ln(f))^2/(4*I*f+4*c*ln(f)))*f^a*erfi(1/2*(I*e+b*ln (f)+2*x*(I*f+c*ln(f)))/(I*f+c*ln(f))^(1/2))*Pi^(1/2)/(I*f+c*ln(f))^(1/2)+1 /16*exp(3*I*d-1/4*(3*I*e+b*ln(f))^2/(3*I*f+c*ln(f)))*f^a*erfi(1/2*(3*I*e+b *ln(f)+2*x*(3*I*f+c*ln(f)))/(3*I*f+c*ln(f))^(1/2))*Pi^(1/2)/(3*I*f+c*ln(f) )^(1/2)
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(3829\) vs. \(2(422)=844\).
Time = 6.98 (sec) , antiderivative size = 3829, normalized size of antiderivative = 9.07 \[ \int f^{a+b x+c x^2} \cos ^3\left (d+e x+f x^2\right ) \, dx=\text {Result too large to show} \]
(f^a*Sqrt[Pi]*(-27*(-1)^(3/4)*E^(((I/4)*(-e^2 + (2*I)*b*e*Log[f] + b^2*Log [f]^2))/(f - I*c*Log[f]))*f^3*Cos[d]*Erfi[((-1)^(1/4)*(e + 2*f*x - I*b*Log [f] - (2*I)*c*x*Log[f]))/(2*Sqrt[f - I*c*Log[f]])]*Sqrt[f - I*c*Log[f]] + 27*(-1)^(1/4)*c*E^(((I/4)*(-e^2 + (2*I)*b*e*Log[f] + b^2*Log[f]^2))/(f - I *c*Log[f]))*f^2*Cos[d]*Erfi[((-1)^(1/4)*(e + 2*f*x - I*b*Log[f] - (2*I)*c* x*Log[f]))/(2*Sqrt[f - I*c*Log[f]])]*Log[f]*Sqrt[f - I*c*Log[f]] - 3*(-1)^ (3/4)*c^2*E^(((I/4)*(-e^2 + (2*I)*b*e*Log[f] + b^2*Log[f]^2))/(f - I*c*Log [f]))*f*Cos[d]*Erfi[((-1)^(1/4)*(e + 2*f*x - I*b*Log[f] - (2*I)*c*x*Log[f] ))/(2*Sqrt[f - I*c*Log[f]])]*Log[f]^2*Sqrt[f - I*c*Log[f]] + 3*(-1)^(1/4)* c^3*E^(((I/4)*(-e^2 + (2*I)*b*e*Log[f] + b^2*Log[f]^2))/(f - I*c*Log[f]))* Cos[d]*Erfi[((-1)^(1/4)*(e + 2*f*x - I*b*Log[f] - (2*I)*c*x*Log[f]))/(2*Sq rt[f - I*c*Log[f]])]*Log[f]^3*Sqrt[f - I*c*Log[f]] - 3*(-1)^(3/4)*E^(((I/4 )*(-9*e^2 + (6*I)*b*e*Log[f] + b^2*Log[f]^2))/(3*f - I*c*Log[f]))*f^3*Cos[ 3*d]*Erfi[((-1)^(1/4)*(3*e + 6*f*x - I*b*Log[f] - (2*I)*c*x*Log[f]))/(2*Sq rt[3*f - I*c*Log[f]])]*Sqrt[3*f - I*c*Log[f]] + (-1)^(1/4)*c*E^(((I/4)*(-9 *e^2 + (6*I)*b*e*Log[f] + b^2*Log[f]^2))/(3*f - I*c*Log[f]))*f^2*Cos[3*d]* Erfi[((-1)^(1/4)*(3*e + 6*f*x - I*b*Log[f] - (2*I)*c*x*Log[f]))/(2*Sqrt[3* f - I*c*Log[f]])]*Log[f]*Sqrt[3*f - I*c*Log[f]] - 3*(-1)^(3/4)*c^2*E^(((I/ 4)*(-9*e^2 + (6*I)*b*e*Log[f] + b^2*Log[f]^2))/(3*f - I*c*Log[f]))*f*Cos[3 *d]*Erfi[((-1)^(1/4)*(3*e + 6*f*x - I*b*Log[f] - (2*I)*c*x*Log[f]))/(2*...
Time = 1.11 (sec) , antiderivative size = 422, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {4976, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int f^{a+b x+c x^2} \cos ^3\left (d+e x+f x^2\right ) \, dx\) |
\(\Big \downarrow \) 4976 |
\(\displaystyle \int \left (\frac {3}{8} f^{a+b x+c x^2} \exp \left (-3 i \left (d+e x+f x^2\right )+2 i d+2 i e x+2 i f x^2\right )+\frac {3}{8} f^{a+b x+c x^2} \exp \left (-3 i \left (d+e x+f x^2\right )+4 i d+4 i e x+4 i f x^2\right )+\frac {1}{8} f^{a+b x+c x^2} \exp \left (-3 i \left (d+e x+f x^2\right )+6 i d+6 i e x+6 i f x^2\right )+\frac {1}{8} e^{-3 i \left (d+e x+f x^2\right )} f^{a+b x+c x^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {3 \sqrt {\pi } f^a \exp \left (-\frac {(e+i b \log (f))^2}{-4 c \log (f)+4 i f}-i d\right ) \text {erf}\left (\frac {-b \log (f)+2 x (-c \log (f)+i f)+i e}{2 \sqrt {-c \log (f)+i f}}\right )}{16 \sqrt {-c \log (f)+i f}}+\frac {\sqrt {\pi } f^a \exp \left (-\frac {(3 e+i b \log (f))^2}{4 (-c \log (f)+3 i f)}-3 i d\right ) \text {erf}\left (\frac {-b \log (f)+2 x (-c \log (f)+3 i f)+3 i e}{2 \sqrt {-c \log (f)+3 i f}}\right )}{16 \sqrt {-c \log (f)+3 i f}}+\frac {3 \sqrt {\pi } f^a \exp \left (\frac {(e-i b \log (f))^2}{4 c \log (f)+4 i f}+i d\right ) \text {erfi}\left (\frac {b \log (f)+2 x (c \log (f)+i f)+i e}{2 \sqrt {c \log (f)+i f}}\right )}{16 \sqrt {c \log (f)+i f}}+\frac {\sqrt {\pi } f^a \exp \left (3 i d-\frac {(b \log (f)+3 i e)^2}{4 (c \log (f)+3 i f)}\right ) \text {erfi}\left (\frac {b \log (f)+2 x (c \log (f)+3 i f)+3 i e}{2 \sqrt {c \log (f)+3 i f}}\right )}{16 \sqrt {c \log (f)+3 i f}}\) |
(3*E^((-I)*d - (e + I*b*Log[f])^2/((4*I)*f - 4*c*Log[f]))*f^a*Sqrt[Pi]*Erf [(I*e - b*Log[f] + 2*x*(I*f - c*Log[f]))/(2*Sqrt[I*f - c*Log[f]])])/(16*Sq rt[I*f - c*Log[f]]) + (E^((-3*I)*d - (3*e + I*b*Log[f])^2/(4*((3*I)*f - c* Log[f])))*f^a*Sqrt[Pi]*Erf[((3*I)*e - b*Log[f] + 2*x*((3*I)*f - c*Log[f])) /(2*Sqrt[(3*I)*f - c*Log[f]])])/(16*Sqrt[(3*I)*f - c*Log[f]]) + (3*E^(I*d + (e - I*b*Log[f])^2/((4*I)*f + 4*c*Log[f]))*f^a*Sqrt[Pi]*Erfi[(I*e + b*Lo g[f] + 2*x*(I*f + c*Log[f]))/(2*Sqrt[I*f + c*Log[f]])])/(16*Sqrt[I*f + c*L og[f]]) + (E^((3*I)*d - ((3*I)*e + b*Log[f])^2/(4*((3*I)*f + c*Log[f])))*f ^a*Sqrt[Pi]*Erfi[((3*I)*e + b*Log[f] + 2*x*((3*I)*f + c*Log[f]))/(2*Sqrt[( 3*I)*f + c*Log[f]])])/(16*Sqrt[(3*I)*f + c*Log[f]])
3.2.33.3.1 Defintions of rubi rules used
Int[Cos[v_]^(n_.)*(F_)^(u_), x_Symbol] :> Int[ExpandTrigToExp[F^u, Cos[v]^n , x], x] /; FreeQ[F, x] && (LinearQ[u, x] || PolyQ[u, x, 2]) && (LinearQ[v, x] || PolyQ[v, x, 2]) && IGtQ[n, 0]
Time = 2.16 (sec) , antiderivative size = 426, normalized size of antiderivative = 1.01
method | result | size |
risch | \(-\frac {\sqrt {\pi }\, f^{a} {\mathrm e}^{-\frac {\ln \left (f \right )^{2} b^{2}-6 i \ln \left (f \right ) b e +12 i d \ln \left (f \right ) c +36 d f -9 e^{2}}{4 \left (c \ln \left (f \right )-3 i f \right )}} \operatorname {erf}\left (-x \sqrt {3 i f -c \ln \left (f \right )}+\frac {b \ln \left (f \right )-3 i e}{2 \sqrt {3 i f -c \ln \left (f \right )}}\right )}{16 \sqrt {3 i f -c \ln \left (f \right )}}-\frac {3 \sqrt {\pi }\, f^{a} {\mathrm e}^{-\frac {\ln \left (f \right )^{2} b^{2}-2 i \ln \left (f \right ) b e +4 i d \ln \left (f \right ) c +4 d f -e^{2}}{4 \left (c \ln \left (f \right )-i f \right )}} \operatorname {erf}\left (-x \sqrt {i f -c \ln \left (f \right )}+\frac {b \ln \left (f \right )-i e}{2 \sqrt {i f -c \ln \left (f \right )}}\right )}{16 \sqrt {i f -c \ln \left (f \right )}}-\frac {3 \sqrt {\pi }\, f^{a} {\mathrm e}^{-\frac {\ln \left (f \right )^{2} b^{2}+2 i \ln \left (f \right ) b e -4 i d \ln \left (f \right ) c +4 d f -e^{2}}{4 \left (i f +c \ln \left (f \right )\right )}} \operatorname {erf}\left (-\sqrt {-c \ln \left (f \right )-i f}\, x +\frac {i e +b \ln \left (f \right )}{2 \sqrt {-c \ln \left (f \right )-i f}}\right )}{16 \sqrt {-c \ln \left (f \right )-i f}}-\frac {\sqrt {\pi }\, f^{a} {\mathrm e}^{-\frac {\ln \left (f \right )^{2} b^{2}+6 i \ln \left (f \right ) b e -12 i d \ln \left (f \right ) c +36 d f -9 e^{2}}{4 \left (3 i f +c \ln \left (f \right )\right )}} \operatorname {erf}\left (-\sqrt {-c \ln \left (f \right )-3 i f}\, x +\frac {3 i e +b \ln \left (f \right )}{2 \sqrt {-c \ln \left (f \right )-3 i f}}\right )}{16 \sqrt {-c \ln \left (f \right )-3 i f}}\) | \(426\) |
-1/16*Pi^(1/2)*f^a*exp(-1/4*(ln(f)^2*b^2-6*I*ln(f)*b*e+12*I*d*ln(f)*c+36*d *f-9*e^2)/(c*ln(f)-3*I*f))/(3*I*f-c*ln(f))^(1/2)*erf(-x*(3*I*f-c*ln(f))^(1 /2)+1/2*(b*ln(f)-3*I*e)/(3*I*f-c*ln(f))^(1/2))-3/16*Pi^(1/2)*f^a*exp(-1/4* (ln(f)^2*b^2-2*I*ln(f)*b*e+4*I*d*ln(f)*c+4*d*f-e^2)/(c*ln(f)-I*f))/(I*f-c* ln(f))^(1/2)*erf(-x*(I*f-c*ln(f))^(1/2)+1/2*(b*ln(f)-I*e)/(I*f-c*ln(f))^(1 /2))-3/16*Pi^(1/2)*f^a*exp(-1/4*(ln(f)^2*b^2+2*I*ln(f)*b*e-4*I*d*ln(f)*c+4 *d*f-e^2)/(I*f+c*ln(f)))/(-c*ln(f)-I*f)^(1/2)*erf(-(-c*ln(f)-I*f)^(1/2)*x+ 1/2*(I*e+b*ln(f))/(-c*ln(f)-I*f)^(1/2))-1/16*Pi^(1/2)*f^a*exp(-1/4*(ln(f)^ 2*b^2+6*I*ln(f)*b*e-12*I*d*ln(f)*c+36*d*f-9*e^2)/(3*I*f+c*ln(f)))/(-c*ln(f )-3*I*f)^(1/2)*erf(-(-c*ln(f)-3*I*f)^(1/2)*x+1/2*(3*I*e+b*ln(f))/(-c*ln(f) -3*I*f)^(1/2))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 859 vs. \(2 (312) = 624\).
Time = 0.30 (sec) , antiderivative size = 859, normalized size of antiderivative = 2.04 \[ \int f^{a+b x+c x^2} \cos ^3\left (d+e x+f x^2\right ) \, dx=\text {Too large to display} \]
-1/16*(sqrt(pi)*(c^3*log(f)^3 - 3*I*c^2*f*log(f)^2 + c*f^2*log(f) - 3*I*f^ 3)*sqrt(-c*log(f) - 3*I*f)*erf(1/2*(18*f^2*x + (2*c^2*x + b*c)*log(f)^2 + 9*e*f - 3*(-I*c*e + I*b*f)*log(f))*sqrt(-c*log(f) - 3*I*f)/(c^2*log(f)^2 + 9*f^2))*e^(-1/4*((b^2*c - 4*a*c^2)*log(f)^3 + 27*I*e^2*f - 108*I*d*f^2 + 3*(-4*I*c^2*d + 2*I*b*c*e - I*b^2*f)*log(f)^2 - 9*(c*e^2 - 2*b*e*f + 4*a*f ^2)*log(f))/(c^2*log(f)^2 + 9*f^2)) + 3*sqrt(pi)*(c^3*log(f)^3 - I*c^2*f*l og(f)^2 + 9*c*f^2*log(f) - 9*I*f^3)*sqrt(-c*log(f) - I*f)*erf(1/2*(2*f^2*x + (2*c^2*x + b*c)*log(f)^2 + e*f + (I*c*e - I*b*f)*log(f))*sqrt(-c*log(f) - I*f)/(c^2*log(f)^2 + f^2))*e^(-1/4*((b^2*c - 4*a*c^2)*log(f)^3 + I*e^2* f - 4*I*d*f^2 - (4*I*c^2*d - 2*I*b*c*e + I*b^2*f)*log(f)^2 - (c*e^2 - 2*b* e*f + 4*a*f^2)*log(f))/(c^2*log(f)^2 + f^2)) + 3*sqrt(pi)*(c^3*log(f)^3 + I*c^2*f*log(f)^2 + 9*c*f^2*log(f) + 9*I*f^3)*sqrt(-c*log(f) + I*f)*erf(1/2 *(2*f^2*x + (2*c^2*x + b*c)*log(f)^2 + e*f + (-I*c*e + I*b*f)*log(f))*sqrt (-c*log(f) + I*f)/(c^2*log(f)^2 + f^2))*e^(-1/4*((b^2*c - 4*a*c^2)*log(f)^ 3 - I*e^2*f + 4*I*d*f^2 - (-4*I*c^2*d + 2*I*b*c*e - I*b^2*f)*log(f)^2 - (c *e^2 - 2*b*e*f + 4*a*f^2)*log(f))/(c^2*log(f)^2 + f^2)) + sqrt(pi)*(c^3*lo g(f)^3 + 3*I*c^2*f*log(f)^2 + c*f^2*log(f) + 3*I*f^3)*sqrt(-c*log(f) + 3*I *f)*erf(1/2*(18*f^2*x + (2*c^2*x + b*c)*log(f)^2 + 9*e*f - 3*(I*c*e - I*b* f)*log(f))*sqrt(-c*log(f) + 3*I*f)/(c^2*log(f)^2 + 9*f^2))*e^(-1/4*((b^2*c - 4*a*c^2)*log(f)^3 - 27*I*e^2*f + 108*I*d*f^2 + 3*(4*I*c^2*d - 2*I*b*...
Timed out. \[ \int f^{a+b x+c x^2} \cos ^3\left (d+e x+f x^2\right ) \, dx=\text {Timed out} \]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 4348 vs. \(2 (312) = 624\).
Time = 0.31 (sec) , antiderivative size = 4348, normalized size of antiderivative = 10.30 \[ \int f^{a+b x+c x^2} \cos ^3\left (d+e x+f x^2\right ) \, dx=\text {Too large to display} \]
-1/32*(sqrt(pi)*sqrt(2*c^2*log(f)^2 + 18*f^2)*(((I*c^2*f^a*e^(1/4*b^2*c*lo g(f)^3/(c^2*log(f)^2 + f^2) + 9/4*c*e^2*log(f)/(c^2*log(f)^2 + 9*f^2) + 1/ 2*b*e*f*log(f)/(c^2*log(f)^2 + f^2))*log(f)^2 + I*f^(a + 2)*e^(1/4*b^2*c*l og(f)^3/(c^2*log(f)^2 + f^2) + 9/4*c*e^2*log(f)/(c^2*log(f)^2 + 9*f^2) + 1 /2*b*e*f*log(f)/(c^2*log(f)^2 + f^2)))*cos(-3/4*(9*e^2*f - 36*d*f^2 - (4*c ^2*d - 2*b*c*e + b^2*f)*log(f)^2)/(c^2*log(f)^2 + 9*f^2)) + (c^2*f^a*e^(1/ 4*b^2*c*log(f)^3/(c^2*log(f)^2 + f^2) + 9/4*c*e^2*log(f)/(c^2*log(f)^2 + 9 *f^2) + 1/2*b*e*f*log(f)/(c^2*log(f)^2 + f^2))*log(f)^2 + f^(a + 2)*e^(1/4 *b^2*c*log(f)^3/(c^2*log(f)^2 + f^2) + 9/4*c*e^2*log(f)/(c^2*log(f)^2 + 9* f^2) + 1/2*b*e*f*log(f)/(c^2*log(f)^2 + f^2)))*sin(-3/4*(9*e^2*f - 36*d*f^ 2 - (4*c^2*d - 2*b*c*e + b^2*f)*log(f)^2)/(c^2*log(f)^2 + 9*f^2)))*erf(1/2 *(2*(c*log(f) - 3*I*f)*x + b*log(f) - 3*I*e)*sqrt(-c*log(f) + 3*I*f)/(c*lo g(f) - 3*I*f)) + ((-I*c^2*f^a*e^(1/4*b^2*c*log(f)^3/(c^2*log(f)^2 + f^2) + 9/4*c*e^2*log(f)/(c^2*log(f)^2 + 9*f^2) + 1/2*b*e*f*log(f)/(c^2*log(f)^2 + f^2))*log(f)^2 - I*f^(a + 2)*e^(1/4*b^2*c*log(f)^3/(c^2*log(f)^2 + f^2) + 9/4*c*e^2*log(f)/(c^2*log(f)^2 + 9*f^2) + 1/2*b*e*f*log(f)/(c^2*log(f)^2 + f^2)))*cos(-3/4*(9*e^2*f - 36*d*f^2 - (4*c^2*d - 2*b*c*e + b^2*f)*log(f )^2)/(c^2*log(f)^2 + 9*f^2)) + (c^2*f^a*e^(1/4*b^2*c*log(f)^3/(c^2*log(f)^ 2 + f^2) + 9/4*c*e^2*log(f)/(c^2*log(f)^2 + 9*f^2) + 1/2*b*e*f*log(f)/(c^2 *log(f)^2 + f^2))*log(f)^2 + f^(a + 2)*e^(1/4*b^2*c*log(f)^3/(c^2*log(f...
\[ \int f^{a+b x+c x^2} \cos ^3\left (d+e x+f x^2\right ) \, dx=\int { f^{c x^{2} + b x + a} \cos \left (f x^{2} + e x + d\right )^{3} \,d x } \]
Timed out. \[ \int f^{a+b x+c x^2} \cos ^3\left (d+e x+f x^2\right ) \, dx=\int f^{c\,x^2+b\,x+a}\,{\cos \left (f\,x^2+e\,x+d\right )}^3 \,d x \]